home *** CD-ROM | disk | FTP | other *** search
- /* getcolor "member" function */
- int circle_getcolor(CIRCLE *pc) { return pc->color; }
-
- /* setcolor member function */
- int circle_setcolor (CIRCLE *pc, int val); { return (pc->color
- = val); }
-
- /* define and initialize the action package */
- CIRCLE_ACTIONS caction = { circle_getcolor, circle_setcolor
- };
-
- /* define CIRCLE c and hook it to the action pack */
- CIRCLE c = { 10, 10, 5, 4, /* set x, y, radius and color
- */
- &caction; /* set paction pointer in c to point to the
- action package */
- };
-